package com.qishi.ex3.connector.http;


import org.apache.tomcat.util.res.StringManager;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class HttpProcessor {

    public HttpProcessor(HttpConnector connector) {
        this.connector = connector;
    }

    /**
     * 与此处理器关联的HTTP连接器
     */
    private HttpConnector connector = null;
    private HttpRequest request;
    private HttpRequestLine requestLine = new HttpRequestLine();
    private HttpResponse response;

    protected String method = null;
    protected String queryString = null;

    protected StringManager sm = StringManager.getManager(Constants.Package);

    public void process(Socket socket) {
        //TODO 处理套接字
        SocketInputStream input = null;
        OutputStream output = null;
        try {
            input = new SocketInputStream(socket.getInputStream(),2048);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
